home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr35 / qname31.zip / QNAME3.TXT < prev   
Text File  |  1993-05-17  |  6KB  |  164 lines

  1. QNAME3.C
  2. By Henry Gerlach
  3. May 12, 1993
  4.  
  5. Based on:
  6.  
  7.  
  8.  
  9. QNAME2.C
  10. by David J. Semon
  11. March 22, 1991
  12.  
  13. The following is the original documentation for QNAME2
  14. After that is the documentation of the changes that I, Henry Gerlach,
  15. made.
  16.  
  17.  
  18. ---------------------------------------------------------------------
  19. This program, QNAME2.C, is based on the idea found in QNAME.C
  20. written by Martin Leon (AKA HMan) of Ashton-Tate.  I recommend
  21. you read the text file named QNAME.TXT to get the idea of the
  22. original program.
  23. ---------------------------------------------------------------------
  24.  
  25. QNAME2's purpose is to automate renaming of QWK packets.  It
  26. renames QWK files using the first three characters of the original
  27. file name, the current month and day, followed by a letter to
  28. distinguish between multiple packets downloaded the same day from
  29. the same bulletin board.  The letter will go all the way up to the
  30. letter Z, so you can download and rename 26 QWK files a day from the
  31. same bulletin board without a name conflict.
  32.  
  33. Here are some of the rules the program follows:
  34.  
  35. 1. SYNTAX:  QNAME2 <filename>
  36.  
  37.    -- No EXT is necessary; QNAME2 adds QWK as the extension.
  38.    -- <filename> is the name the BBS assigns to the QWK file you
  39.       download.  Examples:  Ashton-Tate BBS is ATBBS.
  40.                             Semware BBS is SEMWARE.
  41.  
  42. 2. QNAME2 looks in the current directory for the QWK file to rename.
  43.  
  44. 3. If no file name is provided, a message displays the correct syntax.
  45.  
  46. 4. If the file name is not found, a message is displayed saying so.
  47.  
  48. 5. If the file name is found, QNAME2 renames the file to a new name
  49.    that contains the first three characters of the input file name plus
  50.    current day, month and a sequence letter (A,B,C,D, etc.).
  51.  
  52.        Examples:     Assume DOS date = 03/22/91
  53.                      Assume first file renamed on that date
  54.  
  55.                      ATBBS    becomes  ATB0322A.QWK
  56.                      SEMWARE  becomes  SEM0322A.QWK
  57.                      ABCDEFGH becomes  ABC0322A.QWK
  58.                      AB       becomes  AB0322A.QWK
  59.                      A        becomes  A0322A.QWK
  60.  
  61. 6. If the destination file name already exists, QNAME2 increments
  62.    the last letter by one character and renames the original using
  63.    the new last letter.
  64.  
  65.        Example:      Assume DOS date = 03/22/91
  66.                      Assume ATB0322A.QWK already exists
  67.  
  68.                      ATBBS    becomes  ATB0322B.QWK
  69.  
  70.  
  71. Although you could type QNAME2 <filename> from the DOS prompt, I find
  72. the best way to use the program is to include it in the BAT file I use
  73. to start my communication program so that it is automatically run when
  74. I exit from the communication program.  Put in an entry for each bulletin
  75. board file you want renamed.  Remember, if the file doesn't exist, you
  76. simply get a message saying so.  Also, remember, the current directory
  77. must be the one containing the QWK files for QNAME2 to work.
  78.  
  79. An example BAT file would be:
  80.  
  81. C:
  82. CD C:\TELIX           * Change to TELIX directory
  83. TELIX                 * Run TELIX
  84. CD C:\DOWNLOAD        * Change to download directory for QWK files
  85. QNAME2 ATBBS          * Rename ATBBS.QWK
  86. QNAME2 SEMWARE        * Rename SEMWARE.QWK
  87. QNAME2 OASIS          * Rename OASIS.QWK
  88. QNAME2 ADBUS          * Rename ADBUS.QWK
  89.     .
  90.     .
  91.     .
  92. QNAME2 FINAL          * Rename FINAL.QWK
  93. CD C:\
  94.  
  95.  
  96. QNAME2 can be in any directory in your PATH, but the QWK files you
  97. want to rename MUST be in the current directory.
  98.  
  99. ---------------------------------------------------------------------
  100.  
  101. Hope you find this helpful.  I've tested the program with as many
  102. combinations as I could think up with no problems.  If you find any
  103. problems, leave a message for me on the Ashton-Tate BBS (User ID is
  104. EAGLEONE) or on COMPUSERVE (User ID is 73257,3332) or on the Semware
  105. BBS (Qedit) in Atlanta, GA.
  106.  
  107. I've also included the C source code for those who want to review or
  108. change it for themselves.  If you do, please don't distribute your
  109. version unless you change the name and clearly annotate the changes.
  110. This will avoid confusion if someone has a problem.
  111.  
  112. This program is for use by the public domain.  It may not be sold at
  113. all.  Feel free to distribute to anyone who can benefit from it.
  114.  
  115.  
  116. Dave Semon
  117.  
  118.  
  119. --------------------------------------------------------------------------
  120. Changes to QNAME2 to make QNAME3 By Henry Gerlach
  121.  
  122.        examples below assume the date is 05-17-93
  123.  
  124.    1.  remodified to again compile with MS Quick C.
  125.  
  126.    2.  Program now accepts additional arguments; Additional paths
  127.        in which to look for a file matching the prospective new name.
  128.        There is no limit to how many paths can be searched, except
  129.        for how many will fit on the command line.
  130.        Example: QNAME3 PC-OHIO.QWK A:\
  131.        Would check the current directory AND A:\ for a file named
  132.        PC-0517A.QWK before renaming PC-OHIO.QWK to PC-0517A.QWK
  133.  
  134.  
  135.    3.  File to be changed need not be in current directory. A path
  136.        may be included with the name.
  137.        Example: QNAME3 C:\OLX\PC-OHIO.QWK would rename the file
  138.        in that path, rather than the current directory. That path 
  139.        becomes the default place to look for matching files, as well.
  140.        So, the above comand would look for PC-0517A.QWK in C:\OLX\
  141.        rather than the current directory. If you still want to search
  142.        the current directory, use feature 2 above.
  143.  
  144.    4.  extension need not be .QWK. if no extension is given, .QWK
  145.        will be assumed.
  146.        Example: QNAME3 PC-OHIO.REP would rename to PC-0517A.REP
  147.  
  148.    5.  QNAME3.EXE is now smaller, in spite of all the additions.
  149.        No, I didn't use PKLITE. You are free to do so If you wish.
  150.  
  151.  
  152. I've also included the C source code for those who want to review or
  153. change it for themselves.  If you do, please don't distribute your
  154. version unless you change the name and clearly annotate the changes.
  155. This will avoid confusion if someone has a problem.
  156.  
  157. This program is for use by the public domain.  It may not be sold at
  158. all.  Feel free to distribute to anyone who can benefit from it.
  159.  
  160. Henry Gerlach.
  161. I may be reached at:
  162. internet: henry.gerlach@pcohio.com
  163. fidonet:  (1:157/200)
  164.